package grouplife::Schema::Result::TopicType;

# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE

use strict;
use warnings;

use Moose;
use MooseX::NonMoose;
use namespace::autoclean;
extends 'DBIx::Class::Core';

__PACKAGE__->load_components(qw( TimeStamp Core ));

=head1 NAME

grouplife::Schema::Result::Store

=cut

__PACKAGE__->table("topic_type");

__PACKAGE__->add_columns(
		"id",
		{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
		"type_name",
		{ data_type => "text", is_nullable => 1 },
		"type_desc",
		{ data_type => "text", is_nullable => 1 },
		"is_admin_only",
		{ data_type => "char", is_nullable => 1 },
		"is_tuanzhang_only",
		{ data_type => "char", is_nullable => 1 },
		"created_by",
		{ data_type => "integer", is_nullable => 0 },
		"updated_by",
		{ data_type => "integer", is_nullable => 0 },
		"created",
		{ data_type => 'datetime', timezone => "Asia/Shanghai", set_on_create => 1 },
		"updated",
		{ data_type => 'datetime', timezone => "Asia/Shanghai", set_on_create => 1, set_on_update => 1 }
);


__PACKAGE__->has_one(
                "users",
                "grouplife::Schema::Result::User",
                { "foreign.id" => "self.created_by" },
                );
__PACKAGE__->has_one(
                "users",
                "grouplife::Schema::Result::User",
                { "foreign.id" => "self.updated_by" },
                );

__PACKAGE__->set_primary_key("id");


# You can replace this text with custom code or comments, and it will be preserved on regeneration
__PACKAGE__->meta->make_immutable;
1;
